package com.liuliu.controller;

import io.swagger.annotations.*;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/test")
@Api(tags = "这是一个测试接口")
@ApiModel(value = "这是测试接口",description = "测试swagger接口文档")
public class TestContrller {
    @RequestMapping("/api")
    //notes 方法备注说明 value 方法用途作用
    @ApiOperation(value = "接口方法测试",notes = "根据用户名和密码进行判断用户是否存在")
    //参数说明 paraptype:参数放在神魔地方 query：用于@requestparam  path:用于路径
    @ApiImplicitParams({
            @ApiImplicitParam(name = "name", value = "用户名", required = false, paramType = "query", dataType = "String"),
            @ApiImplicitParam(name = "pass", value = "密码", required = false, paramType = "query", dataType = "String")
    })
    public String testApi(@RequestParam(value = "name") String username, @RequestParam(value = "pass") String password) {
        return null;
    }
}
